package com.aiit.pojo.order;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_sale_order")
public class SaleOrder {
    @ApiModelProperty(value = "主键id")
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty(value = "零件ID")
    private Integer lingjianId;
    @ApiModelProperty(value = "零件数量")
    private Integer number;
    @ApiModelProperty(value = "总金额")
    private double totalAmount;
    @ApiModelProperty(value = "用户ID")
    private Integer userId;
    @ApiModelProperty(value = "顾客ID")
    private Integer customerId;
    @ApiModelProperty(value = "订单状态(1下单2退单)")
    private Integer state;
    @ApiModelProperty(value = "退单原因")
    private String msg;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    //逻辑删除
    @ApiModelProperty(value = "逻辑删除")
    @TableField(value = "deleted")
    @TableLogic
    private Integer deleted;
}
